using UnityEngine;
using System.Collections.Generic;

public class Engineer : Part {
	private KICOITController controller;

	public override void onBackup () {
		//called every time ship updates
		base.onBackup ();
		print ("engineer onBackup()");
		if (!controller) {
			foreach (PartModule m in this.Modules) {
				if (m is KICOITController) {
					print ("found controller");
					controller = m as KICOITController;
					break;
				}
			}
		}
		if(!controller) Debug.LogError("KICOITController module missing on "+ this.name);
		else controller.OnBackup ();	 	
	}
}